Release 10.1A: OpenEdge Data Management:
DataServer for ODBC
Naming conventions
When planning for maximum transparency across OpenEdge databases and ODBC data sources, be sure to consider the restrictions that each places on naming data-source objects when you perform a Progress-to-ODBC conversion. Table 2–2 describes these restrictions, and the notes that follow it discuss how the DataServer resolves differences between OpenEdge and ODBC naming conventions.
Table 2–2: OpenEdge database and ODBC data-source naming restrictions
( Category OpenEdge DB2 Informix Sybase Alphanumeric characters A-Z or a-z
0-9 A-Z or a-z
0-91 A-Z or a-z
0-9 All alphanumeric characters from the character set that you defined for your Sybase database Special characters Allows $, &, #, %, –, and _2 Allows @, $, #, and _3 Allows _ Allows @, $, #, _, ¥, and £3 Initial character Alphabetic only Alphabetic only See your data-source documentation Alphabetic only Maximum length of object name 32 characters 18 characters 18 characters (10 for database) 24 characters4 Keywords Not allowed5 Not allowed5 Allowed but not recommended5 Not allowed5 Unique table names Required6 Required7 Required Required8
- In a DB2 schema, lowercase letters in object names are converted to uppercase letters.
- Although OpenEdge allows you to use the ampersand (&) in database-object names, the OpenEdge Studio tools use this character internally to denote preprocessor directives.
- When the DataServer encounters characters not supported by OpenEdge in a table, index, or field name, it converts them to underscores ( _ ) in the schema holder. For example, the data-source table name emp@status becomes emp_status in the schema holder. If the unsupported character is at the beginning of an object name, the DataServer substitutes a lowercase z. Also, the DataServer strips @ symbols from stored procedure parameter names.
- Object names in these data sources are limited by the data source to 30 characters. When you use the Progress-to-ODBC utility to perform a database conversion, however, the utility truncates object names to 24 characters in order to accommodate the suffix characters that it appends when it finds nonunique names, reused OpenEdge keywords, array fields, sequences, triggers, and so forth. If you intend to use the Progress-to-ODBC utility, be sure to limit object names to 24 characters to accommodate this name resolution during conversion.
- OpenEdge databases and most ODBC data sources contain restrictions against using keywords as database object names. If a data source object name consists of an OpenEdge keyword, the DataServer appends an underscore character ( _ ) to the name. For example, an object named “each” becomes “each_”
- DB2 and Sybase qualify nonunique table names to make them unique (see your data-source documentation for details); however, OpenEdge still regards these qualified names as nonunique. The DataServer resolves nonunique table names for you as follows: when OpenEdge encounters matching table names while creating or updating a schema holder, it names the second and subsequent tables table-1, table-2, etc. For example, if OpenEdge encounters a table named lee.employee (the employee table owned by the user lee) that is the second instance of the name in the data source, it names the corresponding table in the schema holder employee-1.
NOTE: When resolving naming conventions, the DataServer can append up to three characters to an object name: two in the case of a nonunique name and one in the case of an OpenEdge keyword. Therefore, you should limit your object names to 29 characters so that you do not exceed the OpenEdge 32-character limit for object names in the schema holder. Note that object-name length limit for some data sources (for example, DB2) is low enough that you are unlikely to exceed the OpenEdge 32-character limit.- DB2 allows you to qualify an object name by adding the following:
- the data-source instance name
- the owner’s name
- (for columns) the table name- Sybase allows you to qualify an object name by adding the following:
- the database name
- the owner’s name
- (for columns) the table name
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |